package top.whysu.edevice.dto.manage;

import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 添加节点
 */
public class NodeAddDTO {
    /**
     * 父节点树id
     */
    @NotNull(message = "父节点id不能为空！")
    private BigDecimal pid;
    /**
     * 要添加的节点名称
     */
    @NotBlank(message = "节点名称不能为空！")
    private String name;

    /**
     * 节点类型 {@link top.whysu.edevice.constant.DataDictionary.NodeType}
     */
    @NotNull(message = "节点类型不能为空")
    private Integer nodeType;

    public BigDecimal getPid() {
        return pid;
    }

    public void setPid(BigDecimal pid) {
        this.pid = pid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getNodeType() {
        return nodeType;
    }

    public void setNodeType(Integer nodeType) {
        this.nodeType = nodeType;
    }
}
